#!/bin/bash -e

function info() {
echo Usage: `basename $0` 'in'
exit 2
}

while getopts  ":p:f:r:l:y:" opt; do
	case  $opt  in
		p) out_prefix=$OPTARG;;
		f) suffix=$OPTARG;;
		r) r=$OPTARG;;
		l) perl=$OPTARG;;
		y) py=$OPTARG;;
		*) info;;
	esac
done
shift $(($OPTIND - 1))


if [ $# -lt 1 ]; then info; fi

. $var

# IFS(Internal Field Seprator) IFS=$' \t\n'

test -n "$r" && Rscript $tools_path/script/install.r $module $r

# cpanm module 
# cpanm -l $destination_base A::B

# cpanm -l . -L . Time-HiRes-1.9733.tar.gz

# cpanm --reinstall -l . -L . DBD


test -n "$perl" && cpanm -l $tools_path/pm $module
test -n "$py" && Rscript $tools_path/script/install.r $module $r
